package cn.wusifx.zabbix.request.builder.proxy;

import cn.wusifx.zabbix.request.BaseRequest;
import cn.wusifx.zabbix.request.builder.UpdateRequestBuilder;

import java.util.Map;

/**
 * https://www.zabbix.com/documentation/4.0/manual/api/reference/proxy/update
 */
public class ProxyUpdateRequestBuilder extends UpdateRequestBuilder {
    private String proxyId;
    public ProxyUpdateRequestBuilder(String auth) {
        super("proxy.update", auth);
    }

    public ProxyUpdateRequestBuilder(Long id, String auth) {
        super("proxy.update", id, auth);
    }

    public String getProxyId() {
        return proxyId;
    }

    public ProxyUpdateRequestBuilder setProxyId(String proxyId) {
        this.proxyId = proxyId;
        return this;
    }

    @Override
    public BaseRequest<Map<String, Object>> builder() {
        baseRequest.getParams().put("proxyid",proxyId);
        return baseRequest;
    }
}
